package com.learn.string;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class TestString02 {


    public static void main(String[] args) {
        int n = 20;
        a(n);
        System.out.println("------");
        System.out.println(n);

        System.out.println("------>");
        ArrayList<Object> objects = new ArrayList<>();
        objects.add(1);
        objects.add("2");
        objects.add(true);
        Iterator<Object> iterator = objects.iterator();
        while (iterator.hasNext()) {
            Object next = iterator.next();
            System.out.println(next);
//            iterator.remove();
//            objects.remove(next);
        }
        System.out.println("------>");
        objects.forEach(System.out::println);

        Map<String, Object> map = new HashMap<>();

        map.put("aaa",11);
        map.put("bb",2);
        map.put("cc",3);
        map.put("dd",8);

        map.forEach((k,v)->{
            System.out.println(k+"---"+v);
        });

    }

    private static void a(int n) {
        n=66;
        System.out.println(n);
    }
}
